var koa = require('koa');
var route = require('koa-route');
var cors = require('koa-cors');

var app = new koa();

app.use(cors());

app.use(route.get('/', function () {
    this.body = {
        "name": "Phone",
        "Value": "Human wealth ",
        "sites": [
            {"name": "Aplle","info": ["iphone","ipad","mac"]},
            {"name": "Aplle","info": ["iphone","ipad","mac"]},
            {"name": "Aplle","info": ["iphone","ipad","mac"]}
        ]
    };
}));

app.listen(3000, () => {
    console.log('服务器启动')
});